<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String tip = (String)request.getAttribute("tip");
String lastUrl = request.getHeader("Referer");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <link type="text/css" rel="stylesheet" href="/css/loginform.css"></link>
      <title>登录</title>
      <script src="/js/jquery-1.6.1.min.js" type="text/javascript"></script>
      <script type="text/javascript">
      $(function(){
        $("#PassInputUsername0").focus(function(){
           $("#PassUsername0").addClass("inputactive");
        });
        $("#PassInputUsername0").blur(function(){
           $("#PassUsername0").removeClass("inputactive");
        });
        $("#PassInputPassword0").focus(function(){
           $("#PassPassword0").addClass("inputactive");
        });
        $("#PassInputPassword0").blur(function(){
           $("#PassPassword0").removeClass("inputactive");
        });
        <%if(tip != null) {%>$("#PassError0").html("<%=tip %>");$("#PassError0").show();
        $("#PassInputUsername0").val("<%=request.getParameter("username") %>");
        $("#PassInputPassword0").val("<%=request.getParameter("password") %>"); <%} %>
      })
      function checkLogin() {
       if($("#PassInputUsername0").val()=='') {$("#PassError0").html("请输入用户名");$("#PassError0").show();return false;}
       if($("#PassInputPassword0").val()=='') {$("#PassError0").html("请输入密码");$("#PassError0").show();return false;}
       return true;
      }
      </script>
   </head>
   <body>
   <div style="width:600px;margin:0 auto;">
      <div id="leftpart">
         <form id="userform" action="/login.do" onsubmit="return checkLogin();" method="post">
         <input type="hidden" name="url" value="<%=lastUrl %>"/>
            <fieldset>
               <div id="PassFormWapper0" class="pass-form-wapper-login">
                  <div style="height: 20px;">
                  <p id="PassError0" class="pass-server-error" style="display:none;"></p>
                  </div>
                  <p id="PassUsername0" class="pass-username" style="display:">
                    <label for="PassInputUsername0">用户名：</label>
                    <input id="PassInputUsername0" class="pv:username" type="text" maxlength="" value="" name="username" autocomplete="off">
                    <span class="pass-valid-note pass-note-passed" style="display:none;"></span>
                    <span class="pass-desc" style="display:none;"></span>
                  </p>
                  <p style="display:" class="pass-password" id="PassPassword0"><label for="">密码：</label><input type="password" maxlength="" value="" class="pv:password" name="password" id="PassInputPassword0" autocomplete="off"><span style="display:none;" class="pass-valid-note "></span><span style="display:none;" class="pass-desc"></span></p>
                  <p style="display:" class="pass-mem_pass" id="PassMem_pass0"><input type="checkbox" checked="true" class="pv:mem_pass" name="mem_pass" id="PassInputMem_pass0"><label for="PassInputMem_pass0">记住我的登录状态</label><span style="display:none;" class="pass-valid-note "></span><span style="display:none;" class="pass-desc"></span></p>
               </div>
               <p class="pass-submit">
                  <button id="submitbutton" type="submit">
                  <span>马上登录</span>
                  </button>
                  <a href="http://" target="_blank">忘记密码</a>
               </p>
            </fieldset>
         </form>
      </div>
      <div id="rightpart">
         <div class="reg_clew">还没有账号？</div>
         <div class="reg_now"><a href="/reg.html" style="color:#fff;">立即注册</a></div>
      </div>
      <div style="clear:both;"></div>
      </div>
   </body>
</html>